﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="addNew.aspx.vb" Inherits="WebApplication1.addNew" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<p style="font-size: x-large; font-weight: bold">
Add New Spirit
</p>    
<br />
    
<p>
        Spirit Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_sName" runat="server"></asp:TextBox>
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            BackColor="Yellow" ControlToValidate="tb_sName" Display="Dynamic" 
            ErrorMessage="Please enter spirit name" ForeColor="Red"></asp:RequiredFieldValidator>
</p>

<p>
        Spirit Price:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        &nbsp;
        <asp:TextBox ID="tb_sPrice" runat="server"></asp:TextBox>
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            BackColor="Yellow" ControlToValidate="tb_sPrice" Display="Dynamic" 
            ErrorMessage="Please enter spirit price" ForeColor="Red"></asp:RequiredFieldValidator>
        <asp:RangeValidator ID="RangeValidator1" runat="server" BackColor="Yellow" 
            ControlToValidate="tb_sPrice" Display="Dynamic" 
            ErrorMessage="The price can only contain number, and the range shold between 0 and 100000" 
            ForeColor="Red" MaximumValue="10000" MinimumValue="0" Type="Double"></asp:RangeValidator>
</p>

<p>
        Percentage Alochol:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_perAlochol" runat="server"></asp:TextBox>
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
            BackColor="Yellow" ControlToValidate="tb_perAlochol" Display="Dynamic" 
            ErrorMessage="Please enter percentage alcohol" ForeColor="Red"></asp:RequiredFieldValidator>
</p>

<p>
        Produced In:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_produecdIn" runat="server"></asp:TextBox>
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
            BackColor="Yellow" ControlToValidate="tb_produecdIn" Display="Dynamic" 
            ErrorMessage="Please enter where the spirit prodeced" ForeColor="Red"></asp:RequiredFieldValidator>
</p>

<p>
        Manufacturer Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_mName" runat="server"></asp:TextBox>
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
            BackColor="Yellow" ControlToValidate="tb_mName" Display="Dynamic" 
            ErrorMessage="Please enter manufacturer name" ForeColor="Red"></asp:RequiredFieldValidator>
</p>

<p>
        Manufacturer Website:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_mURL" runat="server"></asp:TextBox>
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
            BackColor="Yellow" ControlToValidate="tb_mURL" Display="Dynamic" 
            ErrorMessage="Please enter manufacturer website" ForeColor="Red"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            BackColor="Yellow" ControlToValidate="tb_mURL" Display="Dynamic" 
            ErrorMessage="This is not a valid website, please check it again" 
            ForeColor="Red" 
            ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
        &nbsp;
</p>

<p>
        Picture::&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <asp:FileUpload ID="fup_picture" runat="server" Height="16px" />
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
            BackColor="Yellow" ControlToValidate="fup_picture" Display="Dynamic" 
            ErrorMessage="Please upload a picture" ForeColor="Red"></asp:RequiredFieldValidator>
</p>

<p>
        Details:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_details" runat="server" Height="105px" TextMode="MultiLine" 
            Width="277px"></asp:TextBox>
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
            BackColor="Yellow" ControlToValidate="tb_details" Display="Dynamic" 
            ErrorMessage="Please enter details" ForeColor="Red"></asp:RequiredFieldValidator>
</p>

<p>
        <asp:Button ID="Button1" runat="server" Height="35px" Text="Add New Spirit" 
            Width="123px" />
</p>

<p>
</p>
<p>
</p>
</asp:Content>
